//
//  LYQResourcesManageStatusCell.m
//  ZCProject
//
//  Created by Zheng on 2016/12/13.
//  Copyright © 2016年 Zheng. All rights reserved.
//

#import "LYQResourcesManageStatusCell.h"

@implementation LYQResourcesManageStatusCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        [self.contentView addSubview:self.titleLbl];
        [self.contentView addSubview:self.statusLbl];
        
        [self layoutSubviewsInContentView];
        
    }
    return self;
}

#pragma mark - 约束布局
- (void)layoutSubviewsInContentView {
    
    [_titleLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.centerX.equalTo(self.mas_centerX);
    }];
    
    [_statusLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.height.equalTo(@(kWScale(30)));
        make.width.equalTo(@(kWScale(65)));
        make.right.mas_equalTo(-kWScale(15));
    }];
    
}

#pragma mark - lazy load subviews
- (UILabel *)titleLbl {
    if (_titleLbl) {
        return _titleLbl;
    }
    
    _titleLbl = [[UILabel alloc] init];
    _titleLbl.font = kWFont(15);
    _titleLbl.textColor = kLYQBlack;
    _titleLbl.text = @"咨询5";
    
    return _titleLbl;
}

- (UILabel *)statusLbl {
    if (_statusLbl) {
        return _statusLbl;
    }
    
    _statusLbl = [[UILabel alloc] init];
    _statusLbl.font = kWFont(15);
    _statusLbl.textAlignment = NSTextAlignmentCenter;
    _statusLbl.text = @"发布中";
    _statusLbl.layer.borderWidth = kWScale(1);
    _statusLbl.layer.cornerRadius = kWScale(15);
    
    
    return _statusLbl;
}


@end
